﻿package com.zouloux.abstract 
{
	import flash.events.Event;
	import flash.utils.getQualifiedClassName;
	
	/**
	 * ...
	 * @author ZoulouX
	 */
	public class AScroll implements IScroll
	{
		// Les variables
		protected var _target					:Object;
		protected var _variable					:String;
		protected var _min						:Number;
		protected var _max						:Number;
		protected var _position					:Number;
		protected var _step						:Number;
		protected var _view						:IScrollView;
		
		
		// Les getters
		public function get target():Object { return _target; }
		public function get variable():String { return _variable; }
		public function get min():Number { return _min; }
		public function get max():Number { return _max; }
		public function get position():Number { return _position; }
		public function get step():Number { return _step; }
		public function get view():IScrollView { return _view; }
		
		
		// Les setters
		public function set target(value:Object):void 
		{
			_target = value;
		}
		public function set variable(value:String):void 
		{
			_variable = value;
		}
		public function set min(value:Number):void 
		{
			_min = value;
		}
		public function set max(value:Number):void 
		{
			_max = value;
		}
		public function set position(value:Number):void 
		{
			_position = value;
		}
		public function set step(value:Number):void 
		{
			_step = value;
		}
		public function set view(value:IScrollView):void 
		{
			_view = value;
		}
		
		
		// Le constructeur
		public function AScroll ()
		{
			// Interdire l'instanciation directe
			if (getQualifiedClassName(this) == "com.zouloux.abstract::AScroll")
				throw new Error("Please don't instanciate directly an abstract class! Just extends it :-)");
		}
		
		public function down ():void
		{
			
		}
		
		public function up ():void
		{
			
		}
		
		public function update (event:Event = null):void
		{
			
		}
	}
}